MESSAGE (STATUS "Toolchain: Windows Mobile")

MESSAGE (STATUS "Binary dir: ${PROJECT_BINARY_DIR}")

#INCLUDE ("${PROJECT_BINARY_DIR}/ToolchainCommon.cmake")
#INCLUDE ("ToolchainCommon.cmake")

SET(CMAKE_SYSTEM_NAME      WindowsCE)
SET(CMAKE_SYSTEM_PROCESSOR ARMV4I)
SET(CMAKE_SYSTEM_VERSION   5.01)

# Set Windows Mobile SDK
SET(CMAKE_WINCE_SDK "Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" CACHE STRING "SDK")

SET(CMAKE_C_COMPILER "D:/Programs/Microsoft Visual Studio 9.0/Common7/IDE/devenv.com")
SET(CMAKE_CXX_COMPILER "D:/Programs/Microsoft Visual Studio 9.0/Common7/IDE/devenv.com")

#SET(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} /ENTRY:mainACRTStartup")

#SET (CMAKE_C_FLAGS "/SUBSYSTEM:windowsce,5.01")
#/Od /I "..\..\SDK\headers" /I "..\..\Libs\stb_image" 
#/D "_DEBUG" 
#/D "_WIN32_WCE=0x501" 
#/D "UNDER_CE" 
#/D "WIN32_PLATFORM_PSPC" /D "WINCE" /D "DEBUG" /D "_WINDOWS" /D "ARM" /D "_ARM_" /D "_UNICODE" /D "UNICODE" /D "POCKETPC2003_UI_MODEL" /D "_MBCS" /Gm /EHsc /MTd /fp:fast /GR- /Fo"int\Debug/" /Fd"int\Debug/vc80.pdb" /W3 /nologo /c /Zi /TP

#SET (CMAKE_C_FLAGS "/D \"DEBUG\" /D \"_DEBUG\" /D \"_WIN32_WCE=0x501\" /D \"UNDER_CE\" /D \"WIN32_PLATFORM_PSPC\" /D \"WINCE\" /D \"_WINDOWS\" /D \"ARM\" /D \"_ARM_\" /D \"_UNICODE\" /D \"UNICODE\" /D \"POCKETPC2003_UI_MODEL\" /D \"_MBCS\" /Gm /EHsc /MTd /W3 /c /Zi /Od")
#MESSAGE (STATUS "C flags: ${CMAKE_C_FLAGS}")

#SET (CMAKE_EXE_LINKER_FLAGS "/SUBSYSTEM:WINDOWSCE,5.01 /entry:main")

MESSAGE (STATUS "Linker flags: ${CMAKE_EXE_LINKER_FLAGS}")

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)